Skip to main content
Version: 1.x.x

Request Payload Data

One of the basic functionality of typescript in this type of library, that is specifying the request type of payload. We define here the data that we want to send to the server.


Example

type RequestPayloadDataType = {
name: string;
email: string;
age: number;
};

const postUser = builder.createCommand<ResponseType, RequestPayloadDataType>()({
method: "POST",
endpoint: "/users",
});